﻿@model IEnumerable<store.Product>
<!-- san pham moi -->
<div class="section with-carousel">
    <div class="container">
        <div class="row carousel-container offer">
            <div class="col-xs-12 col-sm-12">

                <h4 class="section-title">Hàng khuyến mại</h4>
                <div class="section-body">

                    <!-- carousel control nav direction -->
                    <div class="control-direction">
                        <ul class="direction-nav carousel-direction">
                            <li>
                                <a class="carousel-prev btn" href="#">
                                    <span class="icon-arrow-left"></span>
                                </a>
                            </li>
                            <li>
                                <a class="carousel-next btn" href="#">
                                    <span class="icon-arrow-right"></span>
                                </a>
                            </li>
                        </ul>
                    </div>
                    <!-- /carousel control nav direction -->

                    <!-- carousel wrapper -->
                    <div class="carousel-wrapper row" data-minitems="1" data-maxitems="4" data-loop="true" data-autoplay="true" data-slideshow-speed="3000" data-speed="300">
                        <ul class="products-container product-grid carousel-list portrait animated" data-animation="fadeInUp">

                            @foreach (var item in Model)
                            {                              
                                
                                <li>
                                    <div class="product">
                                        <a href="@Url.Action("Detail", "Product", new { id = item.ProductID })" class="product-link clearfix">
                                            @*<div class="ribbon new"></div>*@
                                            <div class="product-thumbnail">
                                                @if (item.Picture != "")
                                                {
                                                    var listImg = item.Picture.Split(',');
                                                    <img src="~/Files/@listImg[1]" alt="" />
                                                }
                                                <div class="caption top-right">@String.Format("-{0}%", item.Sales)</div>
                                                <div class="caption bottom-left">@String.Format("{0:0,000}", item.UnitPrice - (item.UnitPrice * (decimal)item.Sales) / 100) VND</div>
                                            </div>
                                        </a>
                                        <div class="product-info clearfix">
                                            <h4 class="title">
                                                @Html.ActionLink(item.ProductName, "Detail", "Product", new { id = item.ProductID }, null)
                                            </h4>
                                            <div class="details">
                                                <p>
                                                    Mã: <a href="#">@item.ProductCode</a>
                                                </p>
                                                <p class="by">
                                                    Bởi: <a href="#">SHOP</a>
                                                </p>
                                            </div>
                                            <a href="#" class="add-to-cart">
                                                <span class="icon-shopcart"></span>
                                            </a>
                                        </div>
                                    </div>
                                </li>                              
                            }

                        </ul>
                    </div>
                    <!-- /carousel wrapper -->

                </div>

            </div>
        </div>

    </div>
</div>
<!-- /offer products -->
